/*
 * thread_globals.c
 * Created on December 3, 2007; 4:57 PM
 * by VRamadurai
 */

#include "HsTypes.h"
#include "PhyDebug.h"
#include "PhyStruct.h"
#include "PmdGlobals.h"
#include "PhyConstants.h"
#include "thread_globals.h"
#include "threads_common.h"//add 627

volatile hs_int32_t thread1to3_flag1;
volatile hs_int32_t thread1to2_flag1;
volatile hs_int32_t thread2to3_flag1;
volatile hs_int32_t thread3toall_rate_flag;
volatile hs_int32_t thread3_eq_index_flag;
volatile hs_int32_t thread1to2_sincos_flag;
volatile hs_int32_t thread2to1_sincos_flag;

volatile hs_int32_t tx_rx_mode_2;
volatile hs_int32_t tx_rx_mode_3;

/** shared buffers **/
hs_int16_t ssOutIQ_shared[OUTBUFFSIZE*2*2];
hs_int16_t eqOutIQ_shared[EQOUTBUFFSIZE*2*2];
hs_int16_t eqOutIQ_shared_11[EQOUTBUFFSIZE*2*2];
hs_uint8_t ucCckBits_shared[4];
hs_int16_t ssRxSymbIQ_shared[8];

void init_thread_flags(struct HS_Phy11bStr  *HS_Phy11bPtrTh)
{
    HS_Phy11bPtrTh->outbuff_toggle_th1 = 0;
    HS_Phy11bPtrTh->outbuff_toggle_th2 = 0;
    HS_Phy11bPtrTh->eqoutbuff_toggle_th2 = 0;
    HS_Phy11bPtrTh->eqoutbuff_toggle_th3 = 0;
    HS_Phy11bPtrTh->cck_toggle_th2 = 0;
    HS_Phy11bPtrTh->cck_toggle_th3 = 0;

    thread1to3_flag1 = 0;
    thread1to2_flag1 = 0;
    thread2to3_flag1 = 0;

    thread1to2_sincos_flag = 0;
    thread2to1_sincos_flag = 0;

    thread3toall_rate_flag = 0;
    thread3_eq_index_flag = 0;
}
